package com.camel;

import org.apache.camel.CamelContext;
import org.apache.camel.Exchange;
import org.apache.camel.builder.RouteBuilder;
import org.apache.camel.impl.DefaultCamelContext;
import org.apache.camel.impl.DefaultExchange;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class CamelEmailSample {

	public static void main(String[] agrs) throws Exception {
		ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext("camel/file-producer.xml");
		synchronized (appContext) {
			appContext.wait();
		}
		/*CamelContext context = new DefaultCamelContext();
		context.addRoutes(new RouteBuilder() {
			@Override
			public void configure() throws Exception {
				//from("direct://input").to("sftp://firestart@helios/cameltesting/sumit");
				from("direct://input").to("file://target/out");
			}
		});
		context.start();
		
		Exchange exchange = new DefaultExchange(context);
		exchange.getIn().setBody(new StringBuffer().toString());
		context.createProducerTemplate().send("direct://input", exchange);
		
		context.stop();*/
	}
}
